<?php use yii\helpers\Url; ?>
<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>进销存</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <meta charset=utf-8>
    <meta name="renderer" content="webkit">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta name=viewport content="width=device-width,initial-scale=1">

    <link rel="stylesheet" href="/statics/main/bootstrap.min.css">
    <!-- ace settings handler -->
    <!--公共js start-->
    <script src="https://cdn.bootcss.com/jquery/1.8.2/jquery.min.js"></script>
    <script src="/statics/layui/lay/dest/layui.all.js"></script>
    <link href="/statics/layui/css/layui.css" rel="stylesheet"/>
    <script src="https://cdn.bootcss.com/vue/2.5.2/vue.js"></script>
    <script src="/statics/main/base.js?v=1.1"></script>

    <script src="/statics/main/bootstrap.min.js.下载"></script>
    <script src="/statics/main/zeroModal.js.下载"></script>


    <link rel="stylesheet" href="/statics/main/select2.min.css" type="text/css" media="screen, projection">

    <link rel="stylesheet" href="/statics/main/style.css" type="text/css" media="screen, projection">
    <link rel="stylesheet" href="/statics/main/bundle.css" type="text/css" media="screen, projection">

    <!--表格神器start-->
    <link href="/statics/public/handsontable/handsontable.full.min.css" rel="stylesheet">
    <link href="/statics/public/handsontable/pikaday/pikaday.css" rel="stylesheet">
    <script src="/statics/public/handsontable/handsontable.full.min.js"></script>
    <script src="/statics/public/handsontable/moment/moment.js"></script>
    <script src="/statics/public/handsontable/pikaday/pikaday.js"></script>

    <!--表格神器end-->
    <!---NProgress-->
    <script src="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>
    <link href="https://cdn.bootcss.com/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
    <!--end-->
    <script src="https://cdn.bootcss.com/vee-validate/2.0.0-rc.18/vee-validate.min.js"></script>
    <script src="https://cdn.bootcss.com/vee-validate/2.0.0-rc.18/locale/zh_CN.js"></script>
    <script src="https://cdn.bootcss.com/notify.js/3.0.0/notify.min.js"></script>
    <script src="https://cdn.bootcss.com/qs/6.5.1/qs.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap-datepicker/1.7.1/js/bootstrap-datepicker.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap-datepicker/1.7.1/locales/bootstrap-datepicker.zh-CN.min.js"></script>
    <link href="https://cdn.bootcss.com/bootstrap-datepicker/1.7.1/css/bootstrap-datepicker.min.css" rel="stylesheet">
</head>
<style>
    [v-cloak] {
        display: none;
    }
</style>
<script>

    function slideHide() {
        $("#sidebar").toggle();
    }
</script>
<body style="margin: 0px; padding: 0px; border: 0px; height: 100vh; overflow: auto;">
<div class="container" style="height:100vh">
    <div class="header">

        <div id="navbar" class="navbar navbar-default">
            <input type="hidden" value="" name="bookId" id="bookId">
            <div class="navbar-container" id="navbar-container">

                <!--logo start-->
                <div class="navbar-header pull-left" style="width:220px">
                    <div class="logo"
                         style="position:static;float:left;margin-top: 11px;margin-right: 24px;margin-left:24px;">

                        <a href="#" style="width:100%;height:100%;display:block"><img style="height:33px;width:90px"
                                                                                      src="/statics/img/logo2.png"></a>


                    </div>
                    <input type="hidden" id="vipLv" value="2">
                    <div style="float:right;line-height: 50px" onclick="slideHide()">
                        <img style="width:30px;height:40px;" src="/statics/img/Category.png" />
                    </div>
                </div>

                <!--logo end-->

                <!--功能模块 start-->
                <div class="nav pull-left">
                    <ul class="items">

                        <?php
                        $list = $this->params['nav'];
                        $controller = yii::$app->controller->id;
                        foreach ($list as $v) {
                            ?>
                            <li <?php if (strpos($v['url'], $controller) === 0) {
                                echo "class='active'";
                            } ?>>
                                <a href="<?php echo Url::to([$v['url']]); ?>"><span><?php echo $v['name']; ?></span></a>
                            </li>
                        <?php } ?>

                    </ul>

                </div>
                <!--功能模块 end-->

                <!--个人中心-->
                <div class="navbar-buttons navbar-header pull-right userInfo" role="navigation">
                    <ul class="nav ace-nav" style="float:right;">
                        <li class="light-blue" style="width:100%;font-size:14px;">
                            <a class="user  headerFontSize" title="koh(1002)" href="JavaScript:void(0);">
                                    <span class="avatarContent">

										<img class="l" src="/statics/main/1306866870956_97639.27014478063.jpg"
                                             width="40" height="40">


									</span>
                                <span class="header_userInfo">
										<span>&nbsp;<?php echo $this->params['name']; ?>&nbsp;</span>
                                    </span>
                            </a>
                            <ul class="user-menu dropdown-menu-right dropdown-menu  dropdown-caret">
                                <li>
                                    <div class="">
                                        <div class="btnGroup">

                                            <img alt="" src="/statics/main/icon_userInfo.png">
                                            <a class="" href="">用户中心</a>

                                        </div>
                                        <div class="btnGroup">
                                            <img alt="" src="/statics/main/icon_quit.png">
                                            <a class="" href="<?php echo Url::to(['login/logout']); ?>">退出</a>
                                        </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
                <!--个人中心 end-->

            </div>
            <!-- /.navbar-container -->
        </div>
    </div>
    <div class="main-container" id="main-container" style="height:100vh">
        <div class="sidebar " id="sidebar" style="height: 674px;">
            <style>
                .broad-ul {
                    margin-bottom: 0;
                }

                .sidebar {
                    width: 186px;
                }

                .sidebar .main-container {
                    overflow-y: scroll;
                    width: 186px;
                }

                /*#mrightChild {*/
                    /*margin-left: 186px*/
                /*}*/

                .sideBtn {
                    left: 186px;
                }

                .sidebar #broad-div .scmSideBtn {
                    position: fixed;
                    bottom: 0;
                    height: 40px;
                    text-align: center;
                    width: 176px;
                    background-color: #fff;
                }

                .sidebar #broad-div .scmSideBtn img {
                    margin-top: 10px;
                    cursor: pointer
                }

                #tinyBroad .broad-ul {
                    display: none
                }

                #tinyBroad #menu_sale {
                    margin-top: 16px;
                }

                #tinyBroad .menuHeader img {
                    top: 13px;
                }

                #tinyBroad .scmSideBtn {
                    text-align: center;
                    cursor: pointer;
                    margin-top: 13px;
                }

                #tinyBroad .menuHeader {
                    padding-left: 12px;
                    height: 48px;
                    position: relative
                }

                #tinyBroad .menuHeader:hover {
                    cursor: pointer;
                    background-color: #f8f8f8;
                }

                #tinyBroad .menuHeader:hover .broad-ul {
                    display: block;
                    position: absolute;
                    width: 176px;
                    left: 44px;
                    top: 0;
                    z-index: 100000;
                    background-color: #fafafa;
                    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
                }

                #tinyBroad .menuHeader {
                    line-height: 15px
                }
            </style>
            <!-- 功能 start -->
            <div id="broad-div">
                <div class="box">
                    <?php
                    foreach ($this->params['left_nav'] as $k => $v): ?>
                        <?php if ($v['module'] == 2): ?>
                            <div class="menuHeader"><img alt="" src="/statics/main/setting1.png">
                                <?php echo $v['name']; ?>
                            </div>
                        <?php endif; ?>
                        <?php foreach ($this->params['left_nav'] as $v2) : ?>
                            <?php if ($v2['pid'] == $v['id']): ?>
                                <ul class="broad-ul">
                                    <li class="broad-ul-li">
                                        <div class="broad-ul-li-child <?php if ($v2['url'] == ((yii::$app->controller->id) . '/' . yii::$app->controller->action->id)) {
                                            echo 'active';
                                        } ?>">
                                            <a href="<?php echo Url::to([$v2['url']]); ?>" class="broad-ul-li-child">
                                                <span class="menu-text"><?php echo $v2['name']; ?></span>
                                            </a>
                                        </div>
                                    </li>
                                </ul>
                            <?php endif; ?>
                        <?php endforeach; ?>
                    <?php endforeach; ?>
                </div>
            </div>
        </div>
        <div id="mrightChild">
            <div class="main-content">
                <div class="tip_wrapper" style="margin:18px 5px 0 24px;display:none">
                </div>
                <div class="page-content">
                    <div>
                        <div style="position:relative">